package com.item.read;

import com.intellij.notification.NotificationGroupManager;
import com.intellij.notification.NotificationType;
import com.intellij.openapi.project.Project;
import com.sun.istack.Nullable;
import org.apache.commons.lang.StringUtils;

public class MyNotifier {
    public static void notify(@Nullable Project project,
                                   String content) {
        if(content==null || StringUtils.isEmpty(content.trim())){
            content = new String("Drinking ice for ten years, it is difficult to cool the blood.");
        }
        NotificationGroupManager.getInstance()
                .getNotificationGroup("Custom Notification Group")
                .createNotification(content, NotificationType.INFORMATION)
                .notify(project);
    }
}
